﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;

public partial class administrator_login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnDangNhap_Click(object sender, EventArgs e)
    {
        string username = txtuname.Text;
        string password = txtpass.Text;
        AdminBUS admin = new AdminBUS()
        {
            UserName = username,
            Pass = password,
        };
        bool resuilt = admin.DangNhap();
        if (resuilt)
        {
            Session["Admin"] = admin;
            Response.Redirect("Default.aspx");
        }
        else
        {
            lbThongBao.Text = "Đăng nhập thất bại";
        }


    }
}
